from rest_framework import serializers
from goods.models import CategoryVisitCount


class CategoryVisitCountSerializer((serializers.ModelSerializer)):
    category = serializers.StringRelatedField(read_only=True)  # 不满足我们的要求 改写

    class Meta:
        model = CategoryVisitCount
        fields = "__all__"
